package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysAcceptancegoodsMapper;
import com.ruoyi.system.domain.SysAcceptancegoods;
import com.ruoyi.system.service.ISysAcceptancegoodsService;
import com.ruoyi.common.core.text.Convert;

/**
 * 供货验收货物Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-12-13
 */
@Service
public class SysAcceptancegoodsServiceImpl implements ISysAcceptancegoodsService 
{
    @Autowired
    private SysAcceptancegoodsMapper sysAcceptancegoodsMapper;

    /**
     * 查询供货验收货物
     * 
     * @param acceptanceGoodsId 供货验收货物ID
     * @return 供货验收货物
     */
    @Override
    public SysAcceptancegoods selectSysAcceptancegoodsById(Long acceptanceGoodsId)
    {
        return sysAcceptancegoodsMapper.selectSysAcceptancegoodsById(acceptanceGoodsId);
    }

    /**
     * 查询供货验收货物列表
     * 
     * @param sysAcceptancegoods 供货验收货物
     * @return 供货验收货物
     */
    @Override
    public List<SysAcceptancegoods> selectSysAcceptancegoodsList(SysAcceptancegoods sysAcceptancegoods)
    {
        return sysAcceptancegoodsMapper.selectSysAcceptancegoodsList(sysAcceptancegoods);
    }

    /**
     * 新增供货验收货物
     * 
     * @param sysAcceptancegoods 供货验收货物
     * @return 结果
     */
    @Override
    public int insertSysAcceptancegoods(SysAcceptancegoods sysAcceptancegoods)
    {
        sysAcceptancegoods.setCreateTime(DateUtils.getNowDate());
        return sysAcceptancegoodsMapper.insertSysAcceptancegoods(sysAcceptancegoods);
    }

    /**
     * 修改供货验收货物
     * 
     * @param sysAcceptancegoods 供货验收货物
     * @return 结果
     */
    @Override
    public int updateSysAcceptancegoods(SysAcceptancegoods sysAcceptancegoods)
    {
        return sysAcceptancegoodsMapper.updateSysAcceptancegoods(sysAcceptancegoods);
    }

    /**
     * 删除供货验收货物对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteSysAcceptancegoodsByIds(String ids)
    {
        return sysAcceptancegoodsMapper.deleteSysAcceptancegoodsByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除供货验收货物信息
     * 
     * @param acceptanceGoodsId 供货验收货物ID
     * @return 结果
     */
    @Override
    public int deleteSysAcceptancegoodsById(Long acceptanceGoodsId)
    {
        return sysAcceptancegoodsMapper.deleteSysAcceptancegoodsById(acceptanceGoodsId);
    }
}
